/*
 * @Author: zhangfeng
 * @Date: 2024-01-30 16:18:17
 * @LastEditTime: 2024-01-30 17:17:40
 * @LastEditors: zhangfeng
 * @Description:
 * @FilePath: \nodeapi\webpack.config.js
 * © 2023 张峰，All rights reserved.
 */
const path = require("path");

module.exports = {
  mode: "production",
  entry: "./src/app/index.js",
  output: {
    filename: "js/[name]/[name].js",
    path: path.resolve(__dirname, "dist"),
  },
  //这里必须排除，不然无法打包
  externals: {
    sequelize: "require('sequelize')",
  },
  target: "node",
  // resolve: {
  //   fallback: {
  //     util: false,
  //     path: require.resolve("path"),
  //   },
  // },
};
